<?php


namespace app\behaviors;


/**
 * 记录日志
 * Class BEvtBehavior
 * @package app\behaviors
 */
class BEvtBehavior extends \yii\base\Behavior
{
    const WARN = 'warn';
    const RECORD = 'record';
    const CLEAR = 'clear';

    public function events()
    {
        return [
            self::WARN => 'warn',
            self::RECORD => 'record',
            self::CLEAR => 'clear'
        ];
    }

    public function warn()
    {

    }

    public function record()
    {
        echo '记录行为到日志<br>';
    }

    public function clear()
    {
        echo '清空日志<br>';
    }
}